Pog Header Files


Overview

A Pog header file is a text file associated with a Pog script with a list of all the functions and enumerations that Pog script exports for use in other packages.

It's used to provide information to the Pog compiler so that functions and enumerations in other packages can be linked during the compilation process.

When you compile a Pog script the compiler will automatically generate a header file for you. However this is not always accurate, so it is best to create your own.

A header file has the extension .h, e.g. myscript.h

See Header File Reference for details of the header files suppled with the Pog SDK.

 

Structure

Pog header files follow this structure:

Dependencies
This is optional, and most Pog headers don't contain them. The dependencies are the same ones that are defined in the dependencies of your Pog script. See Pog Script Structure for details.

Enumerations
Any enumerations you wish other packages to access must be placed here.

Prototypes
The functions you wish to allow other packages to use. Note that unlike prototypes in your script you must specify the package name as well as the function name, i.e. iExample.MyFunction

 

Example Header File

// Header file for Example Package
// Dependencies ////////////////////////////////////////////////////////////////
uses iSim, iShip, Math
// Enumerated types ////////////////////////////////////////////////////////////
enum eEnumExample
{
	EX_Example1,
	EX_Example2,
}
// Functions ///////////////////////////////////////////////////////////////////
prototype set iExample.ExampleFunction( int count, eEnumExample example );
prototype task iExample.ExampleTask();
prototype int iExample.CountExamples( list example_list );
// EOF